package com.shop.order.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.shop.common.annotation.Excel;
import com.shop.common.core.domain.BaseEntity;

/**
 * 订单信息对象 shop_order
 *
 * @author wuhao
 * @date 2022-04-06
 */
public class ShopOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private String id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderId;

    /** 商品id */
    @Excel(name = "商品id")
    private String goodsId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 用户姓名 */
    @Excel(name = "用户姓名")
    private String userName;

    /** 用户地址 */
    @Excel(name = "用户地址")
    private String userAddress;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String goodsImage;

    /** 购物车ID */
    @Excel(name = "购物车ID")
    private Long cartId;

    /** 邮费 */
    @Excel(name = "邮费")
    private BigDecimal totalPrice;

    /** 实际支付金额 */
    @Excel(name = "实际支付金额")
    private BigDecimal payPrice;

    /** 支付状态（0：未支付，1：已支付） */
    @Excel(name = "支付状态", readConverterExp = "0=：未支付，1：已支付")
    private Long payStatus;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 支付方式 */
    @Excel(name = "支付方式")
    private String payType;

    /** 订单状态（-1 : 申请退款 -2 : 退货成功 0：待发货；1：待收货；2：已收货；3：已完成；-3：已退款） */
    @Excel(name = "订单状态", readConverterExp = "-=1,:=,申=请退款,-=2,:=,退=货成功,0=：待发货；1：待收货；2：已收货；3：已完成；-3：已退款")
    private String status;

    /** 0 未退款 1 申请中 2 已退款 */
    @Excel(name = "0 未退款 1 申请中 2 已退款")
    private Integer refundStatus;

    /** 订单商品总数 */
    @Excel(name = "订单商品总数")
    private Long totalNum;

    /** 快递公司编号 */
    @Excel(name = "快递公司编号")
    private String deliverySn;

    /** 快递单号 */
    @Excel(name = "快递单号")
    private String deliveryId;

    /** 消费赚取积分 */
    @Excel(name = "消费赚取积分")
    private Long useIntegral;

    /** 备注 */
    @Excel(name = "备注")
    private String mark;

    /** 是否删除 */
    @Excel(name = "是否删除")
    private String isDel;

    /** 收货人手机号 */
    @Excel(name = "收货人手机号")
    private String userPhone;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setOrderId(String orderId)
    {
        this.orderId = orderId;
    }

    public String getOrderId()
    {
        return orderId;
    }
    public void setGoodsId(String goodsId)
    {
        this.goodsId = goodsId;
    }

    public String getGoodsId()
    {
        return goodsId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setUserAddress(String userAddress)
    {
        this.userAddress = userAddress;
    }

    public String getUserAddress()
    {
        return userAddress;
    }
    public void setGoodsImage(String goodsImage)
    {
        this.goodsImage = goodsImage;
    }

    public String getGoodsImage()
    {
        return goodsImage;
    }
    public void setCartId(Long cartId)
    {
        this.cartId = cartId;
    }

    public Long getCartId()
    {
        return cartId;
    }
    public void setTotalPrice(BigDecimal totalPrice)
    {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPrice()
    {
        return totalPrice;
    }
    public void setPayPrice(BigDecimal payPrice)
    {
        this.payPrice = payPrice;
    }

    public BigDecimal getPayPrice()
    {
        return payPrice;
    }
    public void setPayStatus(Long payStatus)
    {
        this.payStatus = payStatus;
    }

    public Long getPayStatus()
    {
        return payStatus;
    }
    public void setPayTime(Date payTime)
    {
        this.payTime = payTime;
    }

    public Date getPayTime()
    {
        return payTime;
    }
    public void setPayType(String payType)
    {
        this.payType = payType;
    }

    public String getPayType()
    {
        return payType;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setRefundStatus(Integer refundStatus)
    {
        this.refundStatus = refundStatus;
    }

    public Integer getRefundStatus()
    {
        return refundStatus;
    }
    public void setTotalNum(Long totalNum)
    {
        this.totalNum = totalNum;
    }

    public Long getTotalNum()
    {
        return totalNum;
    }
    public void setDeliverySn(String deliverySn)
    {
        this.deliverySn = deliverySn;
    }

    public String getDeliverySn()
    {
        return deliverySn;
    }
    public void setDeliveryId(String deliveryId)
    {
        this.deliveryId = deliveryId;
    }

    public String getDeliveryId()
    {
        return deliveryId;
    }
    public void setUseIntegral(Long useIntegral)
    {
        this.useIntegral = useIntegral;
    }

    public Long getUseIntegral()
    {
        return useIntegral;
    }
    public void setMark(String mark)
    {
        this.mark = mark;
    }

    public String getMark()
    {
        return mark;
    }
    public void setIsDel(String isDel)
    {
        this.isDel = isDel;
    }

    public String getIsDel()
    {
        return isDel;
    }
    public void setUserPhone(String userPhone)
    {
        this.userPhone = userPhone;
    }

    public String getUserPhone()
    {
        return userPhone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderId", getOrderId())
                .append("goodsId", getGoodsId())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("userAddress", getUserAddress())
                .append("goodsImage", getGoodsImage())
                .append("cartId", getCartId())
                .append("totalPrice", getTotalPrice())
                .append("payPrice", getPayPrice())
                .append("payStatus", getPayStatus())
                .append("payTime", getPayTime())
                .append("payType", getPayType())
                .append("status", getStatus())
                .append("refundStatus", getRefundStatus())
                .append("totalNum", getTotalNum())
                .append("deliverySn", getDeliverySn())
                .append("deliveryId", getDeliveryId())
                .append("useIntegral", getUseIntegral())
                .append("mark", getMark())
                .append("isDel", getIsDel())
                .append("userPhone", getUserPhone())
                .append("createTime", getCreateTime())
                .toString();
    }
}
